package com.lbs.droiddoctor.disease;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import android.os.Parcel;
import android.os.Parcelable;

public class Disease implements Parcelable{

	private String diseaseName;
	private List<String> symptoms;
	
	public Disease() {
		symptoms = new ArrayList<String>();
	}
	public Disease(Parcel in ){
		readFromParcel(in);
	}
	public String getDiseaseName() {
		return diseaseName;
	}
	public void setDiseaseName(String diseaseName) {
		this.diseaseName = diseaseName;
	}
	public List<String> getSymptoms() {
		return symptoms;
	}
	public void setSymptoms(String symptom) {
		this.symptoms.add(symptom);
	}
	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(diseaseName);
		dest.writeStringList(symptoms);
		
	}
	 private void readFromParcel(Parcel in ) {
		 diseaseName = in.readString();
		 //in.readStringList(symptoms);
		 symptoms = new ArrayList<String>();
		 in.readStringList(symptoms);
	 }
	 public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
	        public Disease createFromParcel(Parcel in ) {
	            return new Disease( in );
	        }

	        public Disease[] newArray(int size) {
	            return new Disease[size];
	        }
	    };
	
}
